

#pragma once
#include <vector>
extern "C"
{
#include <libavformat/avformat.h>
#include <libavcodec/avcodec.h>
#include <libavutil/avutil.h>
#include <libavutil/timestamp.h>
#include <libavutil/threadmessage.h>
#include <libavcodec/packet.h>
#include <libavfilter/avfilter.h>
#include <libavutil/mem.h>
#include <libavutil/opt.h>
#include <libavfilter/buffersrc.h>
#include <libavfilter/buffersink.h>

};

#include <string>

class FilterScopeGuard
{
public:
	FilterScopeGuard();
	~FilterScopeGuard();
	void AddFilterInOut(AVFilterInOut * inout);
	void AddFilterCtx(AVFilterContext * filter_ctx);
	void ClearInOut();
	void ClearFilterCtx();
private:
	std::vector<AVFilterInOut*> m_inout_vec;
	std::vector<AVFilterContext*> m_filter_ctx_vec;
};
